package com.mxpio.webapp.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 服务器CPU历史记录表
 *
 * @author: Cheng
 * @date: 2022/10/31
 */

@Entity
@Table(name = "MI_MONITOR_SERVER_CPU_HISTORY")
@Schema(description = "服务器CPU历史记录表")
@Data
@ToString
public class MonitorServerCpuHistory extends BaseEntity {

    @Id
    @Generator
    @Schema(description = "主键ID")
    @Column(name = "ID", length = 64)
    private String id;

    @Schema(description = "IP地址")
    @Column(name = "IP", length = 32)
    private String ip;

    @Schema(description = "CPU序号")
    @Column(name = "CPU_NO", length = 128)
    private Integer cpuNo;

    @Schema(description = "CPU频率（MHz）")
    @Column(name = "CPU_MHZ")
    private Integer cpuMhz;

    @Schema(description = "CPU卖主")
    @Column(name = "CPU_VENDOR")
    private String cpuVendor;

    @Schema(description = "CPU的类别，如：Celeron")
    @Column(name = "CPU_MODEL")
    private String cpuModel;

    @Schema(description = "CPU用户使用率")
    @Column(name = "CPU_USER")
    private Double cpuUser;

    @Schema(description = "CPU系统使用率")
    @Column(name = "CPU_SYS")
    private Double cpuSys;

    @Schema(description = "CPU等待率")
    @Column(name = "CPU_WAIT")
    private Double cpuWait;

    @Schema(description = "CPU错误率")
    @Column(name = "CPU_NICE")
    private Double cpuNice;

    @Schema(description = "CPU使用率")
    @Column(name = "CPU_COMBINED")
    private Double cpuCombined;

    @Schema(description = "CPU剩余率")
    @Column(name = "CPU_IDLE")
    private Double cpuIdle;

}
